#!/usr/bin/env python
# -*- coding: utf-8 -*-

import calendar
import SimpleHTTPServer
import SocketServer
import sys

cal = calendar.HTMLCalendar()
html = cal.formatyearpage(int(sys.argv[1]))
f = open("index.html", "w")
f.write(html)
f.close()
PORT = 8000
Handler = SimpleHTTPServer.SimpleHTTPRequestHandler
httpd = SocketServer.TCPServer(("", PORT) , Handler)
print "serving at port" , PORT
httpd_serve_forver()
print "usage: call.py ano"

